<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="parentDom">parentDom</div>
    <iframe width="600"  height="500" id="iframeId" src="./iframe打开的页面.html" scrolling="yes"></iframe>
        
    <script>
    window.onload = function () {
      // 子页面的window对象
        var _childrenWindow = document.getElementById('iframeId').contentWindow
     // 子页面的DOM
        var _childrenDom=_childrenWindow.document.getElementById('childrenDom');

        console.log(_childrenWindow,_childrenDom,'???');
        console.log(window.frames['#iframeId']);
        postMessage('马英鹏1111111','http://127.0.0.1:5500/iframe标签的用法.html' ,);
        onmessage()
    }

    </script>
</body>
</html>